package com.app.demo;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.demo.Receiver.duan_xin_MyReceiver;
import com.synnapps.carouselview.CarouselView;
import com.synnapps.carouselview.ImageListener;

public class dian_hua_activity extends AppCompatActivity {

    CarouselView carouselView;
    int[] image = {
            R.drawable.dong_tai_1,
            R.drawable.dong_tai_2,
            R.drawable.dong_tai_3,
            R.drawable.dong_tai_4,
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dian_hua);

        carouselView = findViewById(R.id.carouselView);
        //设置轮播图的页面数量；
        carouselView.setPageCount(image.length);

        carouselView.setImageListener(imageListener);

    }

    ImageListener imageListener = new ImageListener() {
        @Override
        public void setImageForPosition(int position, ImageView imageView) {
            imageView.setImageResource(image[position]);
        }
    };
    public void back(View V){
        finish();
    }
}